home *** CD-ROM | disk | FTP | other *** search
/ Ray Dream Studio 5 / Ray Dream.iso / pc / DreamSDK / Windows / SAMPLES / SHADER / SHDR / RAINBOW.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-11  |  1.9 KB  |  56 lines

  1. // Copyright (c)1995 Ray Dream, Inc. All Rights Reserved.
  2. /* $Id: Rainbow.h 1.1 1996/07/19 00:15:33 Damien Exp $ */
  3. // Example of a RainbowShader Creation
  4.  
  5. #ifndef __RAINBOW__
  6. #define __RAINBOW__
  7.  
  8. #ifndef __COMSHDR__
  9. #include "COMShdr.h"
  10. #endif 
  11.  
  12. #ifndef __SHADRDLL__
  13. #include "Shdrdll.h"
  14. #endif
  15.  
  16. DEFINE_GUID(CLSID_RainbowShader, 0x4A819881L, 0x62DD, 0x101C, 0xB8, 0x01, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
  17.  
  18.  
  19. // Data structure for exchange with the Shell
  20. struct RainbowShaderPublicData { 
  21.   short fIntensity;
  22.   long  fModeLocalOrGlobal;
  23.   };                      
  24.  
  25.  
  26. #undef INTERFACE
  27. #define INTERFACE RainbowShader
  28. class RainbowShader : public COMShader {
  29. public :
  30.   RainbowShaderPublicData RainbowPublicData;
  31.   
  32.   RainbowShader();
  33.   ~RainbowShader();
  34.   
  35.   STDMETHODIMP_(I3DExtension*)  Clone(THIS);
  36.   STDMETHODIMP_(short)         GetResID(THIS);
  37.   STDMETHODIMP_(void*)         GetExtensionDataBuffer(THIS);
  38.   STDMETHODIMP_(BOOLEAN)        IsEqualTo(THIS_ I3DExShader* aShader);
  39.   STDMETHODIMP_(BOOLEAN)        DependsOnAppliedExtent(THIS);
  40.   STDMETHODIMP                  DoShade(THIS_ ShadingInOut* theShadingIO, ShadingElem* theShadingElem);
  41.   STDMETHODIMP                  GetValue(THIS_ NUM3D* result, ShadingIn* theShadingIn, ShadingElem* theShadingElem);
  42.   STDMETHODIMP                  GetColor(THIS_ COLOR3D* result, ShadingIn* theShadingIn, ShadingElem* theShadingElem);
  43.   STDMETHODIMP                  GetVector(THIS_ VECTOR3D* result, ShadingIn* theShadingIn, ShadingElem* theShadingElem);
  44.   STDMETHODIMP                  GetShadingFlags(THIS_ ShadingFlags* theFlags);
  45.   STDMETHODIMP_(ULONG)          GetPreferredOutput(THIS);
  46.   
  47.   STDMETHODIMP_(ExtensionDataMap*) GetExtensionDataMap(THIS);
  48.  
  49. protected:
  50.   void           CopyData(COMShader* dest);
  51.   };
  52.                            
  53.                            
  54. #endif // __RAINBOW__
  55.  
  56.